package StudyCode.summary.aclfile;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.AclEntry;
import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadACLType {
	public static void main(String[] args) {
		List<AclEntry> acllist = null;
		Path path = Paths.get("E:/Copy", "1.txt");
		try {
			acllist = (List<AclEntry>) Files.getAttribute(path, "acl:acl", LinkOption.NOFOLLOW_LINKS);
			for (AclEntry aclEntry : acllist) {
				System.out.println(aclEntry.type().toString());
			}
		} catch (IOException e) {
			System.err.println(e);
		}
	}
}
